#include "util.h"
#include <stdlib.h>

static int big=-1;

inline int is_bigendian() {
	if(big!=-1){
		return big;
	}
	union u {
		u_int16_t s;
		char c;
	};
	union u data;
	data.s = 0x0001;
	if (data.c) {
		big= 0;
	} else {
		big= 1;
	}

	return big;

}
